package com.mfangsoft.zhuangjialong.app.applogin.mapper;

import com.mfangsoft.zhuangjialong.app.applogin.model.CustomerEntity;
import com.mfangsoft.zhuangjialong.common.model.Page;
import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;

import java.util.List;

import org.apache.ibatis.annotations.Param;
@WriterRepository
public interface CustomerEntityMapper {
    /**
     * 通过主键删除  
     *
     * @MLTH_generated
     */
    int deleteByPrimaryKey(@Param("id") Long id, @Param("account") String account);

    /**
     * 插入数据  
     *
     * @MLTH_generated
     */
    int insert(CustomerEntity record);

    int insertSelective(CustomerEntity record);

    /**
     * 通过主键查询数据 
     *
     * @MLTH_generated
     */
    CustomerEntity selectByPrimaryKey(@Param("id") Long id, @Param("account") String account);

    int updateByPrimaryKeySelective(CustomerEntity record);

    /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
    int updateByPrimaryKey(CustomerEntity record);

    /**
     * 通过消费者id查询数据
     * @param customer_id
     * @return
     */
	CustomerEntity selectCustomerByCustomer_id(Long customer_id);

	int selectGeneralize_numByC_id(Integer id);

	/**
	 * 根据导购的id查询他的所有消费者
	 * @param page
	 * @return
	 */
	List<CustomerEntity> selectCustomersByUserManagerIdForPage(Page<CustomerEntity> param);
}